
## Created by Anjuta

CC = gcc
CFLAGS = -g -Wall
OBJECTS = gorila.o\
gorila_wrap.o

INCFLAGS = -I/usr/include/python2.6

LDFLAGS = 
LIBS = -lsqlite3

all: _gorila.so

gorila_wrap.c: gorila.i
	swig -python gorila.i
	
gorila_wrap.o: gorila_wrap.c
	$(CC) -c -o gorila_wrap.o gorila_wrap.c $(INCFLAGS)
	

gorila.o: gorila.c
	$(CC) -c -o gorila.o gorila.c $(INCFLAGS) 

_gorila.so: $(OBJECTS)
	ld -o _gorila.so $(OBJECTS) $(LDFLAGS) $(LIBS) -shared 

.SUFFIXES:
.SUFFIXES:	.c .cc .C .cpp .o

.c.o :
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o

.PHONY: all
.PHONY: count
.PHONY: clean
